-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Fix unpickling of string dtypes of legacy pandas versions #61770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Liam3851 thanks a lot for the bug report and the fix!
Looks perfect, and thanks for adding legacy data (we should probably also add some data for 2.0-2.2 ..).
Can you add a note in the doc/source/whatsnew/v2.3.1.rst
file? Because we will want to backport this fix
@@ -218,6 +220,10 @@ def __eq__(self, other: object) -> bool: | |||
return self.storage == other.storage and self.na_value is other.na_value | |||
return False | |||
|
|||
def __setstate__(self, state: MutableMapping[str, Any]) -> None: | |||
self.storage = state.pop("storage", "python") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.storage = state.pop("storage", "python") | |
# back-compat for pandas < 2.3, where na_value did not yet exist | |
self.storage = state.pop("storage", "python") |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.